package com.hsyt.pfc.core.queue;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @Description:
 * @ClassName: SimpleWaitingQueueListener
 * @Package: com.hsyt.pfc.core.queue
 * @Author: wangze@hsyuntai.com
 * @Date: 2018年9月30日 9:36
 * @Copyright: 版权归 HSYUNTAI 所有
 */
public class SimpleWaitingQueueListener extends AbstractWaitingQueueListener {

    private static final Logger LOGGER = LoggerFactory.getLogger(SimpleWaitingQueueListener.class);

    public SimpleWaitingQueueListener() {
        super();
    }

    @Override
    public void onFinsh(WaitingQueueTask task) {
        LOGGER.info("执行等待队列任务完成,target：{} , method: {}, args: {}", task.getTarget(),
                task.getMethod(), task.getParamters());
    }

    @Override
    public void onError(WaitingQueueTask task, Exception e) {
        LOGGER.error("执行等待队列任务失败,target：{} , method: {}, args: {} , error:{}", task.getTarget(),
                task.getMethod(), task.getParamters(), e);
    }
}
